async function load(id) {
  let topbarText = await fetch('/views/web/components/topbar/topbar.html').then(
    (res) => res.text()
  )
  document.querySelector('.topbar').innerHTML = topbarText
  if (id) {
    document.querySelector('#' + id).style.color = '#0d6efd'
  }
}

export { load }
